Preview and Overlay Modes

A capture driver can implement two methods for viewing an incoming video stream: preview mode and overlay mode. If a capture driver implements both methods, the user can choose which method to use.

Preview mode transfers digitized frames from the capture hardware to system memory and then displays the digitized frames in the capture window by using graphics device interface (GDI) functions. Applications might decrease the preview rate when the parent window loses focus, and increase the preview rate when the parent window gains focus. This action improves general system responsiveness because the preview operation is processor intensive.

There are three messages to control the preview operation.

    Use the WM_CAP_SET_PREVIEWI9XCM4 message to enable or disable preview mode by sending the (or the capPreview7E6LLE macro) to a capture window.

    Use the WM_CAP_SET_PREVIEWRATEHJXNI7 message (or the capPreviewRate.PWZ.B macro) to set the rate at which frames are displayed in preview mode

    Use the WM_CAP_SET_SCALE15KSCRO message (or the capPreviewScale30X4ZZ. macro) to enable or disable scaling of the preview video.

 

When preview and scaling are both enabled, the captured video frame is stretched to the dimensions of the capture window. Enabling preview mode automatically disables overlay mode.

Overlay mode is a hardware function that displays the contents of the capture buffer on the monitor without using CPU resources. You can enable and disable overlay mode by sending the WM_CAP_SET_OVERLAY11LAELV message (or the capOverlayJWJNL. macro) to a capture window. Enabling overlay mode automatically disables preview mode.

You can also set the scroll position of the video frame within the client area of the capture window for preview mode or overlay mode by sending the WM_CAP_SET_SCROLLAF2K_0 message (or the capSetScrollPos0_87AO macro) to a capture window.